<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<style>
    .red {
        background: red;
    }

    .blue {
        background: blue;
    }

    .yellow {
        background: yellow;
    }

    .small {
        font-size: 2em; /*1em=16px 相对于父元素进行变化   1rem相对于html根元素*/
    }

    .big {
        font-size: 4em;
    }
</style>

<body>
    <div id="app">
        <p class="red small">pppp1</p>
        <p v-bind:class="['red','small']">pppp2</p>
        <p v-bind:class="['red',(isBig?'big':'')]">pppp3</p>
        <p v-bind:class="{red:true,big:isBig}">pppp4</p>
    </div>
    <script src="./base/vue.min.js"></script>


    <script>
        //通过 v-bind方式绑定class
        
        new Vue({
            el:"#app",
            data:{
                isBig:true
            }
        })
    </script>
</body>

</html>